package dev.famer.typelevel.playground

sealed trait Command[R <: Reply]

object Command {
  final case class INCR() extends Command[Reply.INCRReply]

  object INCR {
    implicit val readResult: ReadResult.Aux[INCR, Reply.INCRReply] = new ReadResult[INCR] {
      type R = Reply.INCRReply

      def read(text: String): R = ???
    }
  }

  final case class ZADD() extends Command[Reply.ZADDReply]

  object ZADD {
    implicit val readResult: ReadResult.Aux[ZADD, Reply.ZADDReply] = new ReadResult[ZADD] {
      type R = Reply.ZADDReply

      def read(text: String): R = ???
    }
  }
}
